import { indexRule } from "../validate/lucky"
import { Application } from "egg"

export default (app: Application) => {

  const {  jwt, router } = app;

  return {
    'lucky.list': {
      method: 'GET',
      path: '/api/lucky/list',
      options: {
        tags: ['lucky.list'],
        description: '模板预制',
        handler: app.controller.lucky.list,

        middlewares: [jwt],
        validate: indexRule,
      },
    }
  }
}